<template>
  <div class="container">
    <CategoryComponent title="美食" :listData="foods">
      <img src="https://www.baidu.com/img/flexible/logo/pc/result.png" alt="" />
    </CategoryComponent>
    <CategoryComponent title="游戏">
      <ul>
        <li v-for="(item, index) in games" :key="index">{{ item }}</li>
      </ul>
    </CategoryComponent>
    <CategoryComponent title="电影" :listData="films">
      <video width="100%" src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" controls></video>
    </CategoryComponent>
  </div>
</template>

<script>
import CategoryComponent from "./components/Category.vue";
// https://s3.ax1x.com/2021/01/16/srJlq0.jpg
// http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
export default {
  name: "App",
  components: {
    CategoryComponent,
  },
  data() {
    return {
      foods: ["火锅", "烧烤", "小龙虾", "红烧肉"],
      games: ["塞尔达", "马里奥", "植物VS僵尸", "黑悟空", "原神"],
      films: ["《教父》", "《无间道》", "《至尊无上》", "《流浪地球》"],
    };
  },
  mounted() {},
  beforeDestroy() {},
  created() {},
  destroyed() {},
  beforeRouteLeave(to, from, next) {
    // ...
    next(false);
  },
  methods: {},
  watch: {},
};
</script>

<style>
.container {
  display: flex;
  justify-content: space-around;
}
</style>